package com.woniuxy.woniufp.trade.clients;

import com.woniuxy.woniufp.common.model.result.Result;
import com.woniuxy.woniufp.common.model.vo.user.UserInfoVo;
import com.woniuxy.woniufp.trade.clients.fallback.UserFeignClientFallback;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "woniufp-system-service")
public interface UserFeignClient {
    /**
     * 通过远程调用 woniufp-system-service 微服务 ，根据用户的ID 查询用户的信息
     * @param userId
     * @return
     */
    @GetMapping("/user/findById/{userId}")
    public Result<UserInfoVo> findById(@PathVariable("userId") Long userId);
}
